package com.sleep.psy.external_server.business.adjustment.service;

import com.sleep.psy.external_server.business.adjustment.entity.AdjustmentPlanDetails;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sleep.psy.external_server.business.adjustment.entity.vo.PlanSleepDetailsReq;
import com.sleep.psy.external_server.business.evaluation.entity.EvaluationRecord;
import com.sleep.psy.external_server.business.evaluation.entity.EvaluationReport;
import com.sleep.psy.external_server.result.Result;

import java.util.List;

/**
 * <p>
 * 调节方案详情 服务类
 * </p>
 *
 * @author wenliguo
 * @since 2025-08-12
 */
public interface AdjustmentPlanDetailsService extends IService<AdjustmentPlanDetails> {

    /**
     * 生成调节方案
     *
     * @param userId     用户id
     * @param planId     计划id
     * @param record     测评记录
     * @param report     测评报告
     * @param isAutoSend 是否自动下发方案：1-是；0-否
     * @author wenliguo
     * @date 2025/8/16 11:45
     */
    List<AdjustmentPlanDetails> generateSleepPlanDetail(Long userId, Long planId, EvaluationRecord record, EvaluationReport report, Integer isAutoSend);


    /**
     * 通过计划id获取具体计划
     * @author wenliguo
     * @date 2025/8/16 11:45
     * @param planId 计划id
     * @return java.util.List<com.sleep.psy.main_server.business2.adjustment.entity.AdjustmentPlanDetails>
     */
    List<AdjustmentPlanDetails> selectPlanDetailsByPlanId(Long planId);

    /**
     * 获取每日的调节详情
     * @author wenliguo
     * @date 2025/8/16 14:40
     * @param req 请求
     * @return com.sleep.psy.main_server.result.Result
     */
    Result selectDetail(PlanSleepDetailsReq req);
}
